<?php
// 设置字符编码
header('content-type:text/html;charset=utf-8');

$link = mysqli_connect('localhost', 'root', 'root', 'cd-h52205');

// 接收传递过来的数据
$user = $_POST['username'];
$pass = $_POST['pas'];

// 设置用户名 和 密码
$sql2 = "insert into name values(null,'$user','$pass')";

$data2 = mysqli_query($link, $sql2);

$res = mysqli_fetch_all($data2, MYSQLI_ASSOC);

?>
